/**
 * 权限树 授权的时候使用 细粒度
 id: 'title',
 label: 'title',
 children: 'children'

 permission作为key
 */
const permissionTree = [
  {
    title: '应用管理',
    permission: "system:app", // 仅仅是作为key控制下视图
    children: [
      {
        title: '寝室管理',
        permission: 'system:address', // 仅仅是作为key控制下视图
        children: [
          {
            title: '添加寝室',
            permission: "system:address:add" // 真正可以添加到数据库的权限值
          },
          {
            title: '删出寝室',
            permission: "system:address:delete"
          },
          {
            title: '修改寝室',
            permission: "system:address:update"
          },
          {
            title: '查看寝室',
            permission: "system:address:list"
          },
          {
            title: '查看寝室成员',
            permission: "system:address:member:list"
          }
        ]
      },
      {
        title: '学生管理',
        permission: 'system:student',
        children: [
          {
            title: '添加学生',
            permission: "system:student:add"
          },
          {
            title: '删除学生',
            permission: "system:student:delete"
          },
          {
            title: '更新学生',
            permission: "system:student:update"
          },
          {
            title: '查看学生',
            permission: "system:student:list"
          }
        ]
      },
      {
        title: '送水员管理',
        permission: 'system:worker',
        children: [
          {
            title: '添加送水员',
            permission: "system:worker:add"
          },
          {
            title: '删除送水员',
            permission: "system:worker:delete"
          },
          {
            title: '更新送水员',
            permission: "system:worker:update"
          },
          {
            title: '查看送水员',
            permission: "system:worker:list"
          }
        ]
      },
      {
        title: '送水记录',
        permission: 'system:taskLog',
        children: [
          {
            title: '查看送水记录',
            permission: "system:taskLog:list"
          }
        ]
      },
      {
        title: '商品管理',
        permission: 'system:ticketGoods',
        children: [
          {
            title: '查看商品',
            permission: "system:ticketGoods:list"
          },
          {
            title: '添加商品',
            permission: "system:ticketGoods:add"
          },
          {
            title: '更新商品',
            permission: "system:ticketGoods:update"
          },
          {
            title: '删除商品',
            permission: "system:ticketGoods:delete"
          },
        ]
      },
      {
        title: '历史订单',
        permission: 'system:ticketOrder',
        children: [
          {
            title: '查看历史订单',
            permission: "system:ticketOrder:list"
          },
          {
            title: '处理订单',
            permission: "system:ticketOrder:update"
          }
        ]
      }
    ]
  },
  {
    title: '系统监控',
    permission: "system:monitor",
    children: [
      {
        title: '登录日志',
        children: [
          {
            title: '查看登录日志',
            permission: "system:loginLog:list"
          }
        ]
      },
      {
        title: '操作日志',
        children: [
          {
            title: '查看操作日志',
            permission: "system:adminLog:list"
          }
        ]
      }
    ]
  },
  {
    title: '系统管理',
    permission: "system:admin",
    children: [
      {
        title: '系统管理员',
        children: [
          {
            title: '添加管理员',
            permission: "system:sysUser:add"
          },
          {
            title: '删除管理员',
            permission: "system:sysUser:delete"
          },
          {
            title: '更新管理员',
            permission: "system:sysUser:update"
          },
          {
            title: '查看管理员',
            permission: "system:sysUser:list"
          }
        ]
      },
      {
        title: '角色管理',
        children: [
          {
            title: '添加角色',
            permission: "system:role:add"
          },
          {
            title: '删除角色',
            permission: "system:role:delete"
          },
          {
            title: '更新角色',
            permission: "system:role:update"
          },
          {
            title: '查看角色',
            permission: "system:role:list"
          }
        ]
      }
    ]
  }
]

export default permissionTree
